import request from '@/utils/request'

export default {
  // 获取讲师列表
  getList(current, limit, teacherQuery) {
    return request({
      url: `/edu-service/teacher/pageQuery/${current}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },

  //删除老师
  remove(id) {
    return request({
      url: `/edu-service/teacher/deleteById/${id}`,
      method: 'delete'
    })
  },

  //添加老师
  save(teacher) {
    return request({
      url: '/edu-service/teacher/add',
      method: 'post',
      data: teacher
    })
  },

  //通过id获取老师信息
  getById(id) {
    return request({
      url: `/edu-service/teacher/getById/${id}`,
      method: 'get'
    })
  },

  //更新老师信息
  updateById(teacher) {
    return request({
      url: `/edu-service/teacher/update`,
      method: 'post',
      data: teacher
    })
  },

}
